package com.hzy.fivepalace.db.service;

import com.hzy.fivepalace.db.domain.DtsGroupOpenList;
import com.hzy.fivepalace.db.domain.DtsGroupProduct;
import com.hzy.fivepalace.db.domain.DtsOrder;
import com.hzy.fivepalace.db.domain.DtsUser;
import com.hzy.fivepalace.db.service.base.BaseService;

/**
 * 拼团成团 列Service接口
 *
 * @author ruoyi
 * @date 2022-11-07
 */
public interface DtsGroupOpenListService extends BaseService<DtsGroupOpenList> {

    /**
     *  添加开团信息
     * @param user
     * @return
     */
    DtsGroupOpenList addGroupOpen(DtsUser user, DtsGroupProduct groupProduct, DtsOrder order, int isOwner);


    /**
     *  根据支付订单获取 团购参数
     * @param orderId
     * @return
     */
    DtsGroupOpenList getGroupByDtsOrderId(Integer orderId);

    /**
     *  根据开团编号获取 团购参数
     * @param openNo
     * @return
     */
    DtsGroupOpenList getGroupByGroupNo(String openNo);


    /**
     *  未成团  退款
     * @param openList
     * @return
     */
    int refundOpenList(DtsGroupOpenList openList);
}
